 |
|
 |
Subject: XSP.attachEvent() and page unload... |
 |
 |
 |
Product Area: Domino Server |
 |
Technical Area: Customization |
 |
Platform: Windows XP client |
 |
Release: 8.5.1 |
 |
Reproducible: Not applicable |
 |
 |
 |
 |
- I have a link that does a Cancel. This link has an actionGroup that runs server-side script, and loads a page. It works fine as frog hair - the server-side script runs and the data on the XPage are not saved, exactly as needed.
- I would like to be able to run these exact same actions for a page unload. I see in the page source that the Cancel link/button is doing this:
XSP.attachEvent("<internalID>", "<cancelLinkID>", "onclick", null, true, true);
- It seems a possibility would be to add my own attachEvent to "onunload". Then if the link actions are changed, the onunload actions will change as well. In this instance that's desirable.
- But I can't figure out how to acquire <internalID>, which is something relating to Domino's automagic. If I search page source for that ID, it *only* appears here, on this attachEvent(). That seems more than a little strange, given the code I see in the xspClientDojo.js.uncompressed.js file. It appears this parameter is required for proper _processListeners() operation, which is ultimately what "does the work".
- Perhaps I'm barking up the wrong tree? I did look for some sort of unload event, but nothing exists, so I'm thinking attachEvent() or dojo.connect(), are the likely solutions. I looked up the docs for dojo.connect, and attachEvent() uses that internally, but it still appears I'll need this "magic" element ID to bind using that, too.
- I'd appreciate any suggestions. For instance, since this is a page unload, maybe I should simply pass a null here and let it bind globally?
Thanks for your time...
EDIT:
- Passing null for the first parm doesn't work. It doesn't crash, which is a Good Thing! (tm). It goes blank for a second, then reloads the page in edit mode, tossing all changes, except computed values in other custom controls says "Notes Exception: Object has been recycled". Uh oh.
 
Feedback number DGIE7ZFTFH created by ~Holly Zekhipisonnivu on 01/06/2010

Status: Open
Comments:

|
|  |
|